<template>
  <el-form class="demo-form-inline">
    <el-form-item>
      <el-row>
        <el-col :span="6">
          <el-input
            v-model="formInline.user"
            placeholder="请输入用户名"
          ></el-input>
        </el-col>
        <el-col :span="6">
          <el-select v-model="formInline.region" placeholder="请选择地区">
            <el-option label="上海" value="shanghai"></el-option>
            <el-option label="北京" value="beijing"></el-option>
            <el-option label="广州" value="guangzhou"></el-option>
          </el-select>
        </el-col>
        <el-col :span="6">
          <el-input
            v-model="formInline.user"
            placeholder="请输入用户名"
          ></el-input>
        </el-col>
        <el-col :span="6">
          <el-select v-model="formInline.region" placeholder="请选择地区">
            <el-option label="上海" value="shanghai"></el-option>
            <el-option label="北京" value="beijing"></el-option>
            <el-option label="广州" value="guangzhou"></el-option>
          </el-select>
        </el-col>
      </el-row>
    </el-form-item>
  </el-form>
  <el-button type="primary" @click="handleClick">button</el-button>
</template>

<script setup>
import { reactive, getCurrentInstance } from "vue";
const { emitter } = getCurrentInstance().appContext.config.globalProperties;
const formInline = reactive({
  user: "",
  region: "",
  date: "",
});
function handleClick() {
  emitter.emit("resize");
}
</script>

<style>
.demo-form-inline .el-input {
  --el-input-width: 220px;
}

.demo-form-inline .el-select {
  --el-select-width: 220px;
}
</style>
